-
Notifications
You must be signed in to change notification settings - Fork 16
DTPOMERSER-1274 Select Default currency code #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTPOMERSER-1274 Select Default currency code #296
Conversation
|
Testing video Screen.Recording.2025-03-19.at.10.56.07.PM.mov |
|
|
||
| if (selectedDefaultCurrencyCode == null) { | ||
| // If no default currency code is found, use the first currency in the list | ||
| selectedDefaultCurrencyCode = currencyCodes.iterator().next().getCode(); // Get the first currency code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MINOR: do not do comments inline, always do them above the line you're commenting for
shubh-hw-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
| Set<Currency> currencyCodes = key.getCurrencies(countryCode) != null ? | ||
| key.getCurrencies(countryCode) : new HashSet<Currency>(); | ||
| // Find the country based on the country code | ||
| Country selectedCountry = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this code is duplicated, Can you create method to get country from HyperwalletTransferMethodConfigurationKey?
.../main/java/com/hyperwallet/android/ui/transfermethod/view/SelectTransferMethodPresenter.java
Show resolved
Hide resolved
| } | ||
|
|
||
| // Helper method to get the DefaultCurrencyCode | ||
| private String getDefaultCurrencyCode(@NonNull Country country, @Nullable HyperwalletTransferMethodConfigurationKey keys, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep consistent, Let's assign final in all parameters
grmeyer-hw-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me release Core-SDK, than you can also bump the Core-SDK version to get green CI build
473ca74
.../main/java/com/hyperwallet/android/ui/transfermethod/view/SelectTransferMethodPresenter.java
Outdated
Show resolved
Hide resolved
grmeyer-hw-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work !!!
https://paypal.atlassian.net/browse/DTPOMERSER-1274
This PR has
loadCurrency-Modified this method to display defaultcurrencyCode if exists else display first currency from the list.
loadCurrencySelection-Modified this method to select defaultcurrencyCode if exists else display first currency from the list.
Created helper method to get defaultcurrency based on the selected country.
Testing:
Used UAT program.
Graphql query:
Result: